﻿@model dynamic
@{
    ViewBag.Title = "Book new cargo";
}
<h2>Register new handling event</h2>
<p>Use the form below to register a new cargo handling event.</p>
@Html.ValidationSummary()
@using (Html.BeginForm())
{ 
    <div>
        <fieldset>
            <legend>Event information</legend>
            <p>
                <label for="trackingId">Cargo tracking id:</label>
                @Html.TextBox("id")
                @Html.ValidationMessage("id", "*")
            </p>
            <p>
                <label for="completionTime">Completion time:</label>
                @Html.TextBox("completionTime")
                @Html.ValidationMessage("completionTime", "*")
                <div type="text" id="completionTimeDatepicker">
                </div>
            </p>
            <p>
                <label for="destination">Location:</label>
                @Html.DropDownList("location")
            </p>
            <p>
                <label for="type">Event type:</label>
                @Html.DropDownList("type")
            </p>
            <p>
                <input type="submit" value="Register" />
            </p>
        </fieldset>
    </div>
}
@section scripts
{
    <script type="text/javascript">
        $(document).ready(function () {
            $("#completionTimeDatepicker").datepicker({ altField: '#completionTime' });
        });
    </script>
}